/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.DAO;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author ItaloLopes
 */
public class FabricaConexao {
    public static Connection GeraConexao()
    {
        Connection Conexao = null;
        try
        {       
            String URL="jdbc:mysql://localhost/bd_italo"; // No caso do MySQL String URL="jdbc:mysql//10.0.0.5/bd_italo";
            String usuario="root"; // String usuario = "root";
            String senha="root"; // String usuario = "root";
            
            Conexao = DriverManager.getConnection(URL, usuario, senha);
            System.out.println("Conectou!");
        }
        catch(SQLException e)
        {
            System.out.println("Erro: "+ e.getMessage());
        }
            return Conexao;
    }
}
